home *** CD-ROM | disk | FTP | other *** search
- {$R-,S-,I+,D+,T+,F-,V-,B-,N-,L+ }
- {$M 1024,5120,5120}
- Program RemovePopUpDice;
-
- { This is the companion program to POPDICE. This short program removes }
- { the resident program from memory if it is loaded and if it is safe to }
- { do so. }
-
- Uses Unhook;
-
- Const
- Version = '1.0';
- Signature = $89; { This value MUST be the same as the resident program's }
-
- Begin
- WriteLn('Attempting to remove POPDICE from memory.');
- If Installed(Signature) { is it installed? }
- Then Begin { yes. }
- If OkToRemove(Signature) { can it be unloaded? }
- Then Begin { yes. }
- RemoveProgram(Signature); { remove it. }
- WriteLn('POPDICE successfully removed.');
- End
- Else Begin { can't be safely removed }
- WriteLn('Unable to remove POPDICE from memory!');
- Halt(2);
- End
- End
- Else Begin { program not found in memory. }
- WriteLn('POPDICE is not installed.');
- Halt(1);
- End;
- End.